projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a3fc4de
)
(sort_args): Error if option is missing an arg.
author
Richard M. Stallman
<rms@gnu.org>
Sun, 28 Jan 1996 04:15:39 +0000
(
04:15
+0000)
committer
Richard M. Stallman
<rms@gnu.org>
Sun, 28 Jan 1996 04:15:39 +0000
(
04:15
+0000)
src/emacs.c
patch
|
blob
|
history
diff --git
a/src/emacs.c
b/src/emacs.c
index 90c66cd6cbeb7aeaa8ac6fd3282bf16a033fd982..4297163dde09072207ffe7306fb29b5eea237e26 100644
(file)
--- a/
src/emacs.c
+++ b/
src/emacs.c
@@
-1090,6
+1090,8
@@
sort_args (argc, argv)
{
options[from] = standard_args[i].nargs;
priority[from] = standard_args[i].priority;
+ if (from + standard_args[i].nargs >= argc)
+ fatal ("Option `%s' requires an argument\n", argv[from]);
from += standard_args[i].nargs;
goto done;
}
@@
-1126,6
+1128,8
@@
sort_args (argc, argv)
this option uses just one argv element. */
if (equals != 0)
options[from] = 0;
+ if (from + options[from] >= argc)
+ fatal ("Option `%s' requires an argument\n", argv[from]);
from += options[from];
}
}